﻿Public Class frmTeechart
    Private m_StructureUpAir As New StructureUpAir
    Private m_ReconnaissanceData As New ReconnaissanceData
    Private m_type As Boolean

    Property type() As Boolean
        Get
            Return Me.m_type
        End Get
        Set(ByVal value As Boolean)
            Me.m_type = value
        End Set
    End Property
    Property StructureUpAir() As StructureUpAir
        Get
            Return Me.m_StructureUpAir
        End Get
        Set(ByVal value As StructureUpAir)
            Me.m_StructureUpAir = value
        End Set
    End Property
    Property ReconnaissanceData() As ReconnaissanceData
        Get
            Return Me.m_ReconnaissanceData
        End Get
        Set(ByVal value As ReconnaissanceData)
            Me.m_ReconnaissanceData = value
        End Set
    End Property
    Private Sub a()
        'Me.TChart1.Aspect.View3D = False
        ''Me.TChart1.Series.Clear()
        'Dim ser1 As New Steema.TeeChart.Styles.Line
        'ser1.Color = Color.Brown
        'Dim Xarray(100), Yarray(100) As Double
        'Dim flag As Integer = 0


        'For t As Integer = 0 To Me.m_ReconnaissanceData.ArrtierData.Length - 1

        '    'Me.TChart1.SetData(1, t + 1, Me.m_ReconnaissanceData(t).ArrDataType(j).MyArrDataConstrue(0).MyFrequency)
        '    ' ser1.Add(Me.m_ReconnaissanceData.ArrtierData(t).Pa / 10, CDbl((Me.m_ReconnaissanceData.ArrtierData(t).DryTemperature)) / 10)
        '    If Me.m_ReconnaissanceData.ArrtierData(t).DryTemperature <> "-9990" Then

        '        Xarray(flag) = CDbl((Me.m_ReconnaissanceData.ArrtierData(t).DryTemperature)) / 10
        '        Yarray(flag) = Me.m_ReconnaissanceData.ArrtierData(t).DistanceTerraHeight
        '        flag = flag + 1
        '    End If



        'Next
        'ReDim Preserve Xarray(flag - 1)
        'ReDim Preserve Yarray(flag - 1)
        'ser1.Add(Xarray, Yarray)

        'Me.TChart1.Text = "温度廓线图"
        ''设置折线样式
        'ser1.Pointer.Visible = True
        'ser1.Pointer.Style = Steema.TeeChart.Styles.PointerStyles.Circle
        'ser1.Pointer.HorizSize = 3
        'ser1.Pointer.VertSize = 3
        'ser1.Pointer.Pen.Visible = False


        ' ''设置左坐标
        'Me.TChart1.Axes.Left.Automatic = True
        'Me.TChart1.Axes.Left.Minimum = -100
        'Me.TChart1.Axes.Left.Maximum = 15
        ''设置底坐标
        'Me.TChart1.Axes.Bottom.Automatic = True
        'Me.TChart1.Axes.Bottom.Minimum = -100
        'Me.TChart1.Axes.Bottom.Maximum = 15
        'Me.TChart1.Series.Add(ser1)
        ''  Me.TChart1.Header.Text = "月逆温差高度变化曲线图"
        'Me.TChart1.Header.Font.Color = Color.Black
        '' Me.TChart1.Export.Image.JPEG.CopyToClipboard()
        ''   TChart1.ShowEditor()
        'TChart1.Legend.Shadow.Visible = False
        'TChart1.Panel.Gradient.Visible = True
        'TChart1.Panel.Gradient.StartColor = Color.White      ' 图表底色开始颜色
        'TChart1.Panel.Gradient.EndColor = Color.White     ' 图表底色结束颜色
        'TChart1.Legend.LegendStyle = Steema.TeeChart.LegendStyles.Series



        Me.TChart1.Aspect.View3D = False
        'Me.TChart1.Series.Clear()
        Dim ser1 As New Steema.TeeChart.Styles.Line
        ser1.Color = Color.Brown
        Dim Xarray(100), Yarray(100) As Double
        Dim flag As Integer = 0

        If Me.m_type = True Then
            For t As Integer = 0 To Me.m_ReconnaissanceData.ArrtierData.Length - 1

                'Me.TChart1.SetData(1, t + 1, Me.m_ReconnaissanceData(t).ArrDataType(j).MyArrDataConstrue(0).MyFrequency)
                ' ser1.Add(Me.m_ReconnaissanceData.ArrtierData(t).Pa / 10, CDbl((Me.m_ReconnaissanceData.ArrtierData(t).DryTemperature)) / 10)
                If Me.m_ReconnaissanceData.ArrtierData(t).DryTemperature <> "-9990" Then

                    Xarray(flag) = CDbl((Me.m_ReconnaissanceData.ArrtierData(t).DryTemperature)) / 10
                    Yarray(flag) = Me.m_ReconnaissanceData.ArrtierData(t).DistanceTerraHeight
                    flag = flag + 1
                End If



            Next
        Else
            For t As Integer = 0 To Me.m_StructureUpAir.ArrStructureUpAirTierData.Length - 1

                'Me.TChart1.SetData(1, t + 1, Me.m_ReconnaissanceData(t).ArrDataType(j).MyArrDataConstrue(0).MyFrequency)
                ' ser1.Add(Me.m_ReconnaissanceData.ArrtierData(t).Pa / 10, CDbl((Me.m_ReconnaissanceData.ArrtierData(t).DryTemperature)) / 10)
                If Me.m_StructureUpAir.ArrStructureUpAirTierData(t).AirTemperature <> "-9990" Then

                    Xarray(flag) = CDbl((Me.m_StructureUpAir.ArrStructureUpAirTierData(t).AirTemperature)) / 10
                    Yarray(flag) = Me.m_StructureUpAir.ArrStructureUpAirTierData(t).Height
                    flag = flag + 1
                End If



            Next
        End If
        
        ReDim Preserve Xarray(flag - 1)
        ReDim Preserve Yarray(flag - 1)
        ser1.Add(Xarray, Yarray)

        Me.TChart1.Text = "温度廓线图"
        '设置折线样式
        ser1.Pointer.Visible = True
        ser1.Pointer.Style = Steema.TeeChart.Styles.PointerStyles.Circle
        ser1.Pointer.HorizSize = 3
        ser1.Pointer.VertSize = 3
        ser1.Pointer.Pen.Visible = False


        ''设置左坐标
        Me.TChart1.Axes.Left.Automatic = True
        Me.TChart1.Axes.Left.Minimum = -100
        Me.TChart1.Axes.Left.Maximum = 15
        '设置底坐标
        Me.TChart1.Axes.Bottom.Automatic = True
        Me.TChart1.Axes.Bottom.Minimum = -100
        Me.TChart1.Axes.Bottom.Maximum = 15
        Me.TChart1.Series.Add(ser1)
        '  Me.TChart1.Header.Text = "月逆温差高度变化曲线图"
        Me.TChart1.Header.Font.Color = Color.Black
        ' Me.TChart1.Export.Image.JPEG.CopyToClipboard()
        '   TChart1.ShowEditor()
        TChart1.Legend.Shadow.Visible = False
        TChart1.Panel.Gradient.Visible = True
        TChart1.Panel.Gradient.StartColor = Color.White      ' 图表底色开始颜色
        TChart1.Panel.Gradient.EndColor = Color.White     ' 图表底色结束颜色
        TChart1.Legend.LegendStyle = Steema.TeeChart.LegendStyles.Series

    End Sub
    ''' <summary>
    ''' 干球温度、露点温度转为相对湿度，%
    ''' </summary>
    ''' <param name="Drytemp">干球温度</param>
    ''' <param name="Dewpoint">露点温度</param>
    ''' <returns>相对湿度 %</returns>
    ''' <remarks></remarks>
    Private Function Dewpoint_RH(ByVal Drytemp As Double, ByVal Dewpoint As Double) As Double
        Dim dblRH As Double = 0
        Dim k As Double = 7.65 * Drytemp / (243.12 + Drytemp)

        Dim c As Double = (7.65 * Dewpoint - k * Dewpoint - 243.12 * k) / (243.12 - Dewpoint)

        dblRH = 10 ^ (c + 2)

        Dewpoint_RH = CInt(dblRH)

    End Function

    Private Sub b()
        'Me.TChart2.Aspect.View3D = False
        ''Me.TChart2.Series.Clear()
        'Dim ser1 As New Steema.TeeChart.Styles.Line


        'Dim Xarray(100), Yarray(100) As Double
        'Dim flag As Integer = 0

        'For t As Integer = 0 To Me.m_ReconnaissanceData.ArrtierData.Length - 1
        '    Xarray(flag) = Dewpoint_RH(CDbl((Me.m_ReconnaissanceData.ArrtierData(t).DryTemperature)) / 10, (Me.m_ReconnaissanceData.ArrtierData(t).DewPointTemperature) / 10)
        '    Yarray(flag) = Me.m_ReconnaissanceData.ArrtierData(t).DistanceTerraHeight
        '    flag = flag + 1

        'Next
        'ReDim Preserve Xarray(flag - 1)
        'ReDim Preserve Yarray(flag - 1)
        'ser1.Add(Xarray, Yarray)



        ''For t As Integer = 0 To Me.m_ReconnaissanceData.ArrtierData.Length - 1

        ''    'Me.TChart2.SetData(1, t + 1, Me.m_ReconnaissanceData(t).ArrDataType(j).MyArrDataConstrue(0).MyFrequency)
        ''    'ser1.Add(Me.m_ReconnaissanceData.ArrtierData(t).Pa / 10, (Me.m_ReconnaissanceData.ArrtierData(t).DewPointTemperature) / 10)
        ''    ser1.Add(Me.m_ReconnaissanceData.ArrtierData(t).Pa / 10, Dewpoint_RH(CDbl((Me.m_ReconnaissanceData.ArrtierData(t).DryTemperature)) / 10, (Me.m_ReconnaissanceData.ArrtierData(t).DewPointTemperature) / 10))
        ''Next
        'Me.TChart2.Text = "相对湿度廓线图"

        ''设置折线样式
        'ser1.Pointer.Visible = True
        'ser1.Pointer.Style = Steema.TeeChart.Styles.PointerStyles.Circle
        'ser1.Pointer.HorizSize = 3
        'ser1.Pointer.VertSize = 3
        'ser1.Pointer.Pen.Visible = False
        'ser1.Color = Color.Blue

        ' ''设置左坐标
        'Me.TChart2.Axes.Left.Automatic = True
        'Me.TChart2.Axes.Left.Minimum = 0
        'Me.TChart2.Axes.Left.Maximum = 100
        ''设置底坐标
        'Me.TChart2.Axes.Bottom.Automatic = True
        'Me.TChart2.Axes.Bottom.Minimum = 0
        'Me.TChart2.Axes.Bottom.Maximum = 100
        'Me.TChart2.Series.Add(ser1)
        ''  Me.TChart2.Header.Text = "月逆温差高度变化曲线图"
        'Me.TChart2.Header.Font.Color = Color.Black
        '' Me.TChart2.Export.Image.JPEG.CopyToClipboard()
        ''   TChart2.ShowEditor()
        'TChart2.Legend.Shadow.Visible = False
        'TChart2.Panel.Gradient.Visible = True
        'TChart2.Panel.Gradient.StartColor = Color.White      ' 图表底色开始颜色
        'TChart2.Panel.Gradient.EndColor = Color.White     ' 图表底色结束颜色
        'TChart2.Legend.LegendStyle = Steema.TeeChart.LegendStyles.Series



        Me.TChart2.Aspect.View3D = False
        'Me.TChart2.Series.Clear()
        Dim ser1 As New Steema.TeeChart.Styles.Line


        Dim Xarray(100), Yarray(100) As Double
        Dim flag As Integer = 0

        If m_type = True Then
            For t As Integer = 0 To Me.m_ReconnaissanceData.ArrtierData.Length - 1
                Xarray(flag) = Dewpoint_RH(CDbl((Me.m_ReconnaissanceData.ArrtierData(t).DryTemperature)) / 10, (Me.m_ReconnaissanceData.ArrtierData(t).DewPointTemperature) / 10)
                Yarray(flag) = Me.m_ReconnaissanceData.ArrtierData(t).DistanceTerraHeight
                flag = flag + 1

            Next
        Else
            'TD6201没有 露点温度 有相对湿度
            For t As Integer = 0 To Me.m_StructureUpAir.ArrStructureUpAirTierData.Length - 1
                Xarray(flag) = Me.m_StructureUpAir.ArrStructureUpAirTierData(t).Humidity
                Yarray(flag) = Me.m_StructureUpAir.ArrStructureUpAirTierData(t).Height
                flag = flag + 1

            Next
        End If
        ReDim Preserve Xarray(flag - 1)
        ReDim Preserve Yarray(flag - 1)
        ser1.Add(Xarray, Yarray)



        'For t As Integer = 0 To Me.m_ReconnaissanceData.ArrtierData.Length - 1

        '    'Me.TChart2.SetData(1, t + 1, Me.m_ReconnaissanceData(t).ArrDataType(j).MyArrDataConstrue(0).MyFrequency)
        '    'ser1.Add(Me.m_ReconnaissanceData.ArrtierData(t).Pa / 10, (Me.m_ReconnaissanceData.ArrtierData(t).DewPointTemperature) / 10)
        '    ser1.Add(Me.m_ReconnaissanceData.ArrtierData(t).Pa / 10, Dewpoint_RH(CDbl((Me.m_ReconnaissanceData.ArrtierData(t).DryTemperature)) / 10, (Me.m_ReconnaissanceData.ArrtierData(t).DewPointTemperature) / 10))
        'Next
        Me.TChart2.Text = "相对湿度廓线图"

        '设置折线样式
        ser1.Pointer.Visible = True
        ser1.Pointer.Style = Steema.TeeChart.Styles.PointerStyles.Circle
        ser1.Pointer.HorizSize = 3
        ser1.Pointer.VertSize = 3
        ser1.Pointer.Pen.Visible = False
        ser1.Color = Color.Blue

        ''设置左坐标
        Me.TChart2.Axes.Left.Automatic = True
        Me.TChart2.Axes.Left.Minimum = 0
        Me.TChart2.Axes.Left.Maximum = 100
        '设置底坐标
        Me.TChart2.Axes.Bottom.Automatic = True
        Me.TChart2.Axes.Bottom.Minimum = 0
        Me.TChart2.Axes.Bottom.Maximum = 100
        Me.TChart2.Series.Add(ser1)
        '  Me.TChart2.Header.Text = "月逆温差高度变化曲线图"
        Me.TChart2.Header.Font.Color = Color.Black
        ' Me.TChart2.Export.Image.JPEG.CopyToClipboard()
        '   TChart2.ShowEditor()
        TChart2.Legend.Shadow.Visible = False
        TChart2.Panel.Gradient.Visible = True
        TChart2.Panel.Gradient.StartColor = Color.White      ' 图表底色开始颜色
        TChart2.Panel.Gradient.EndColor = Color.White     ' 图表底色结束颜色
        TChart2.Legend.LegendStyle = Steema.TeeChart.LegendStyles.Series

    End Sub
    Private Sub c()
        Me.TChart3.Aspect.View3D = False
        'Me.TChart1.Series.Clear()
        Dim ser1 As New Steema.TeeChart.Styles.Line


        Dim Xarray(100), Yarray(100) As Double
        Dim flag As Integer = 0

        If Me.m_type = True Then
            For t As Integer = 0 To Me.m_ReconnaissanceData.ArrtierData.Length - 1
                If Me.m_ReconnaissanceData.ArrtierData(t).WindVane <> "999" Then
                    Xarray(flag) = Me.m_ReconnaissanceData.ArrtierData(t).WindVane
                    Yarray(flag) = Me.m_ReconnaissanceData.ArrtierData(t).DistanceTerraHeight
                    flag = flag + 1
                End If


            Next
        Else
            For t As Integer = 0 To Me.m_StructureUpAir.ArrStructureUpAirTierData.Length - 1
                If Me.m_StructureUpAir.ArrStructureUpAirTierData(t).WindVane <> "999" Then
                    Xarray(flag) = Me.m_StructureUpAir.ArrStructureUpAirTierData(t).WindVane
                    Yarray(flag) = Me.m_StructureUpAir.ArrStructureUpAirTierData(t).Height
                    flag = flag + 1
                End If


            Next
        End If
        ReDim Preserve Xarray(flag - 1)
        ReDim Preserve Yarray(flag - 1)
        ser1.Add(Xarray, Yarray)

        'For t As Integer = 0 To Me.m_ReconnaissanceData.ArrtierData.Length - 1

        '    'Me.TChart1.SetData(1, t + 1, Me.m_ReconnaissanceData(t).ArrDataType(j).MyArrDataConstrue(0).MyFrequency)
        '    ser1.Add(Me.m_ReconnaissanceData.ArrtierData(t).Pa / 10, (Me.m_ReconnaissanceData.ArrtierData(t).WindVane) / 10)
        'Next
        Me.TChart3.Text = "风向廓线图"
        '设置折线样式
        ser1.Pointer.Visible = True
        ser1.Pointer.Style = Steema.TeeChart.Styles.PointerStyles.Circle
        ser1.Pointer.HorizSize = 3
        ser1.Pointer.VertSize = 3
        ser1.Pointer.Pen.Visible = False
        ser1.Color = Color.DarkGreen
        ''设置左坐标
        Me.TChart3.Axes.Left.Automatic = True
        Me.TChart3.Axes.Left.Minimum = 0
        Me.TChart3.Axes.Left.Maximum = 360
        '设置底坐标
        Me.TChart3.Axes.Bottom.Automatic = True
        Me.TChart3.Axes.Bottom.Minimum = 0
        Me.TChart3.Axes.Bottom.Maximum = 360
        Me.TChart3.Series.Add(ser1)
        '  Me.TChart1.Header.Text = "月逆温差高度变化曲线图"
        Me.TChart3.Header.Font.Color = Color.Black
        ' Me.TChart1.Export.Image.JPEG.CopyToClipboard()
        '   TChart1.ShowEditor()
        TChart3.Legend.Shadow.Visible = False
        TChart3.Panel.Gradient.Visible = True
        TChart3.Panel.Gradient.StartColor = Color.White      ' 图表底色开始颜色
        TChart3.Panel.Gradient.EndColor = Color.White     ' 图表底色结束颜色
        TChart3.Legend.LegendStyle = Steema.TeeChart.LegendStyles.Series
        'Me.TChart3.Aspect.View3D = False
        ''Me.TChart1.Series.Clear()
        'Dim ser1 As New Steema.TeeChart.Styles.Line


        'Dim Xarray(100), Yarray(100) As Double
        'Dim flag As Integer = 0

        'For t As Integer = 0 To Me.m_ReconnaissanceData.ArrtierData.Length - 1
        '    If Me.m_ReconnaissanceData.ArrtierData(t).WindVane <> "999" Then
        '        Xarray(flag) = Me.m_ReconnaissanceData.ArrtierData(t).WindVane
        '        Yarray(flag) = Me.m_ReconnaissanceData.ArrtierData(t).DistanceTerraHeight
        '        flag = flag + 1
        '    End If


        'Next
        'ReDim Preserve Xarray(flag - 1)
        'ReDim Preserve Yarray(flag - 1)
        'ser1.Add(Xarray, Yarray)

        ''For t As Integer = 0 To Me.m_ReconnaissanceData.ArrtierData.Length - 1

        ''    'Me.TChart1.SetData(1, t + 1, Me.m_ReconnaissanceData(t).ArrDataType(j).MyArrDataConstrue(0).MyFrequency)
        ''    ser1.Add(Me.m_ReconnaissanceData.ArrtierData(t).Pa / 10, (Me.m_ReconnaissanceData.ArrtierData(t).WindVane) / 10)
        ''Next
        'Me.TChart3.Text = "风向廓线图"
        ''设置折线样式
        'ser1.Pointer.Visible = True
        'ser1.Pointer.Style = Steema.TeeChart.Styles.PointerStyles.Circle
        'ser1.Pointer.HorizSize = 3
        'ser1.Pointer.VertSize = 3
        'ser1.Pointer.Pen.Visible = False
        'ser1.Color = Color.DarkGreen
        ' ''设置左坐标
        'Me.TChart3.Axes.Left.Automatic = True
        'Me.TChart3.Axes.Left.Minimum = 0
        'Me.TChart3.Axes.Left.Maximum = 360
        ''设置底坐标
        'Me.TChart3.Axes.Bottom.Automatic = True
        'Me.TChart3.Axes.Bottom.Minimum = 0
        'Me.TChart3.Axes.Bottom.Maximum = 360
        'Me.TChart3.Series.Add(ser1)
        ''  Me.TChart1.Header.Text = "月逆温差高度变化曲线图"
        'Me.TChart3.Header.Font.Color = Color.Black
        '' Me.TChart1.Export.Image.JPEG.CopyToClipboard()
        ''   TChart1.ShowEditor()
        'TChart3.Legend.Shadow.Visible = False
        'TChart3.Panel.Gradient.Visible = True
        'TChart3.Panel.Gradient.StartColor = Color.White      ' 图表底色开始颜色
        'TChart3.Panel.Gradient.EndColor = Color.White     ' 图表底色结束颜色
        'TChart3.Legend.LegendStyle = Steema.TeeChart.LegendStyles.Series

    End Sub
    Private Sub d()
        Me.TChart4.Aspect.View3D = False
        'Me.TChart1.Series.Clear()
        Dim ser1 As New Steema.TeeChart.Styles.Line
        Dim Xarray(100), Yarray(100) As Double
        Dim flag As Integer = 0

        If Me.m_type = True Then
            For t As Integer = 0 To Me.m_ReconnaissanceData.ArrtierData.Length - 1
                If Me.m_ReconnaissanceData.ArrtierData(t).WindSpeed <> "9990" Then
                    Xarray(flag) = Val(Me.m_ReconnaissanceData.ArrtierData(t).WindSpeed) / 10
                    Yarray(flag) = Val(Me.m_ReconnaissanceData.ArrtierData(t).DistanceTerraHeight)
                    flag = flag + 1
                End If



            Next
        Else
            For t As Integer = 0 To Me.m_StructureUpAir.ArrStructureUpAirTierData.Length - 1
                If Me.m_StructureUpAir.ArrStructureUpAirTierData(t).WindSpeed <> "9990" Then
                    Xarray(flag) = Val(Me.m_StructureUpAir.ArrStructureUpAirTierData(t).WindSpeed) / 10
                    Yarray(flag) = Val(Me.m_StructureUpAir.ArrStructureUpAirTierData(t).Height)
                    flag = flag + 1
                End If



            Next
        End If
        ReDim Preserve Xarray(flag - 1)
        ReDim Preserve Yarray(flag - 1)
        ser1.Add(Xarray, Yarray)

        Me.TChart4.Text = "风速廓线图"
        '设置折线样式
        ser1.Pointer.Visible = True
        ser1.Pointer.Style = Steema.TeeChart.Styles.PointerStyles.Circle
        ser1.Pointer.HorizSize = 3
        ser1.Pointer.VertSize = 3
        ser1.Pointer.Pen.Visible = False
        ser1.Color = Color.DarkCyan
        ''设置左坐标
        Me.TChart4.Axes.Left.Automatic = True
        Me.TChart4.Axes.Left.Minimum = 0
        Me.TChart4.Axes.Left.Maximum = 100
        '设置底坐标
        Me.TChart4.Axes.Bottom.Automatic = True
        'Me.TChart4.Axes.Bottom.Minimum = 0
        'Me.TChart4.Axes.Bottom.Maximum = 0
        Me.TChart4.Series.Add(ser1)

        Me.TChart4.Header.Font.Color = Color.Black
        ' Me.TChart1.Export.Image.JPEG.CopyToClipboard()
        'TChart1.ShowEditor()
        TChart4.Legend.Shadow.Visible = False
        TChart4.Panel.Gradient.Visible = True
        TChart4.Panel.Gradient.StartColor = Color.White      ' 图表底色开始颜色
        TChart4.Panel.Gradient.EndColor = Color.White     ' 图表底色结束颜色
        TChart4.Legend.LegendStyle = Steema.TeeChart.LegendStyles.Series
        'Me.TChart4.Aspect.View3D = False
        ''Me.TChart1.Series.Clear()
        'Dim ser1 As New Steema.TeeChart.Styles.Line
        'Dim Xarray(100), Yarray(100) As Double
        'Dim flag As Integer = 0

        'For t As Integer = 0 To Me.m_ReconnaissanceData.ArrtierData.Length - 1
        '    If Me.m_ReconnaissanceData.ArrtierData(t).WindSpeed <> "9990" Then
        '        Xarray(flag) = Val(Me.m_ReconnaissanceData.ArrtierData(t).WindSpeed) / 10
        '        Yarray(flag) = Val(Me.m_ReconnaissanceData.ArrtierData(t).DistanceTerraHeight)
        '        flag = flag + 1
        '    End If



        'Next
        'ReDim Preserve Xarray(flag - 1)
        'ReDim Preserve Yarray(flag - 1)
        'ser1.Add(Xarray, Yarray)

        'Me.TChart4.Text = "风速廓线图"
        ''设置折线样式
        'ser1.Pointer.Visible = True
        'ser1.Pointer.Style = Steema.TeeChart.Styles.PointerStyles.Circle
        'ser1.Pointer.HorizSize = 3
        'ser1.Pointer.VertSize = 3
        'ser1.Pointer.Pen.Visible = False
        'ser1.Color = Color.DarkCyan
        ' ''设置左坐标
        'Me.TChart4.Axes.Left.Automatic = True
        'Me.TChart4.Axes.Left.Minimum = 0
        'Me.TChart4.Axes.Left.Maximum = 100
        ''设置底坐标
        'Me.TChart4.Axes.Bottom.Automatic = True
        ''Me.TChart4.Axes.Bottom.Minimum = 0
        ''Me.TChart4.Axes.Bottom.Maximum = 0
        'Me.TChart4.Series.Add(ser1)

        'Me.TChart4.Header.Font.Color = Color.Black
        '' Me.TChart1.Export.Image.JPEG.CopyToClipboard()
        ''TChart1.ShowEditor()
        'TChart4.Legend.Shadow.Visible = False
        'TChart4.Panel.Gradient.Visible = True
        'TChart4.Panel.Gradient.StartColor = Color.White      ' 图表底色开始颜色
        'TChart4.Panel.Gradient.EndColor = Color.White     ' 图表底色结束颜色
        'TChart4.Legend.LegendStyle = Steema.TeeChart.LegendStyles.Series

    End Sub

    Private Sub frmTeechart_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        a()
        b()
        c()
        d()

    End Sub


    Private Sub 设置SToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles 设置SToolStripMenuItem.Click
        TChart1.ShowEditor()
    End Sub

    Private Sub 复制CToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles 复制CToolStripMenuItem.Click
        TChart1.Export.Image.JPEG.CopyToClipboard()
    End Sub

    Private Sub 设置SToolStripMenuItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles 设置SToolStripMenuItem1.Click
        TChart2.ShowEditor()
    End Sub

    Private Sub 复制CToolStripMenuItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles 复制CToolStripMenuItem1.Click
        TChart2.Export.Image.JPEG.CopyToClipboard()
    End Sub

    Private Sub 设置SToolStripMenuItem2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles 设置SToolStripMenuItem2.Click
        TChart3.ShowEditor()
    End Sub

    Private Sub 复制CToolStripMenuItem2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles 复制CToolStripMenuItem2.Click
        TChart3.Export.Image.JPEG.CopyToClipboard()
    End Sub

    Private Sub 设置SToolStripMenuItem3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles 设置SToolStripMenuItem3.Click
        TChart4.ShowEditor()
    End Sub

    Private Sub 复制CToolStripMenuItem3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles 复制CToolStripMenuItem3.Click
        TChart4.Export.Image.JPEG.CopyToClipboard()
    End Sub
End Class